@echo off
echo 启动OpenAI API代理服务器...
echo.

REM 检查Python是否安装
python --version >nul 2>&1
if errorlevel 1 (
    echo 错误: 未找到Python，请先安装Python 3.8+
    pause
    exit /b 1
)

REM 安装/更新依赖
echo 安装/更新依赖包...
pip install -r requirements.txt --upgrade --quiet
if errorlevel 1 (
    echo 错误: 依赖安装失败
    pause
    exit /b 1
)

REM 创建日志目录
if not exist logs mkdir logs
if not exist logs\requests mkdir logs\requests

echo 启动服务器...
python main.py

pause 